using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Door : MonoBehaviour
{
    private Animator anitor;
    private int openID;
    void Start()
    {
        anitor = GetComponent<Animator>();
        openID = Animator.StringToHash("Open");
        GameManager.Instance.RegisterDoor(this);
    }


    public void Open()
    {
        anitor.SetTrigger(openID);
        AudioManager.Instance.PlayDoorAudio();
    }
}
